import axios from "../until/axios";
import api from "./api";
export const getBusLineList = () =>
  axios({
    method: "get",
    url: api.bus.busLine,
  });
export const getBusLineDetail = (id) =>
  axios({
    method: "get",
    url: api.bus.busLineDetail + `?linesId=${id}`,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });

//添加订单
export const addBusOrder = (info) =>
  axios({
    method: "post",
    url: api.bus.addBusOrder,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    data: info,
  });
// 获取订单
export const getBusOrder = () =>
  axios({
    method: "get",
    url: api.bus.getBusOrder,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
// 支付订单
export const payBusOrder = (data) =>
  axios({
    method: "POST",
    url: api.bus.payOrder,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    data,
  });
